#pragma once
#ifndef MYQUEUE
#define MYQUEUE
#include<iostream>
template<typename T>
struct myqueue
{
	T* arry;
	int size;
	int front;	//head
	int rear;	//β
	myqueue()
	{
		arry = new T;
		size = 0;
		front = 0;
		rear = 0;
	}
	~myqueue()
	{
		delete[] arry;
	}
	void push(T x)
	{
		size += 1;
		arry[rear] = x;
		rear += 1;
	}
	T pop()
	{
		if (front > rear)
			return (T)false;
		size -= 1;
		T buf = arry[front];
		front += 1;
		return buf;
	}
	void print()
	{
		for (int i = front;i < rear;i++)
			std::cout << arry[i] << "-";
		std::cout << std::endl;
	}
};
#endif
